{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The restaurant's logo section.
  
  Created on 2008-10-14.
  $Id: resto_logo.html 269 2008-11-07 18:04:32Z heavyzheng $
-->
{% endcomment %}

<div id="resto_logo" class="section">

  <div>
    {% if resto.logo_type and resto.logo_data %}
      <img src="/fnr/resto/{{ resto.uid }}/logo/" alt="Logo of {{ resto.name }}"/>
    {% else %}
      <img src="/static/fnr/images/resto_default_logo.gif" alt="{{ resto.name }} (no logo)"/>
    {% endif %}
  </div>
  
  {% if editable %}
    {% if resto.is_current_user_editor or is_admin %}
    
      <a href="javascript:alert('#TODO: not implemented yet!');"><small>[change logo image]</small></a>
      
      {% comment %}
      <div class="form-toggle">
        <a href="javascript:void(0);" onclick="showEditForm('#resto_logo')">[edit]</a>
      </div>
      
      <form class="edit-form hidden" action="." method="POST" enctype="multipart/form-data">
        <input type="hidden" name="section" value="resto_logo"/>
        Select an image:
        <input type="file" size="25" name="logo"/>
        <input type="button" value="Upload" onclick="alert('#TODO not implemented!');"/>
        <input type="button" value="Cancel" onclick="hideEditForm('#resto_logo');"/>
      </form><!--/.edit-form-->
      
      <div class="submitting hidden">
        <img src="/static/fnr/images/waiting.gif" alt="Submitting"/>
        Submitting your request... Please wait...
      </div><!--/.submitting-->
      {% endcomment %}
    
    {% endif %}
  {% endif %}

</div><!--/#resto_logo-->

